<!DOCTYPE html>
<html>
    <head>
        <meta charset='UTF-8'>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title><?php echo $settings['site_name'] ?> - <?php echo $settings['short_intro'] ?></title>
        <meta name="keywords" content="<?php echo $settings['site_keywords'] ?>" />
        <meta name="description" content="<?php echo $settings['short_intro'] ?>" />
        <?php $this->load->view('common/header-meta'); ?>
        <style>
            .teacher-list{
                text-align: center;
                float: left;    margin-left: 25px;
                margin-top: 20px;
            }
            }
            .teacher-list .img {
                width: 120px;
                height: 180px;
            }
            .teacher-list .img >img{
                width: 120px;
                height: 180px;
            }
        </style>
    </head>
    <body>
        <?php $this->load->view('common/header'); ?>
        <div class="container">
            <div class="row">

                <div class="col-md-8">
                    <?php if ($action == "index"): ?>

                        <div class="panel">
                            <div class="panel-heading" style="border-bottom: 2px #0575bd solid;">
                                <div class="panel-title" style="color: #0575bd;font-weight: 600;">教师风采</div>
                            </div>
                            <div class="panel-body info_detail">

                                <?php if ($teacher_list): ?>
                                    <div class="">

                                        <?php foreach ($teacher_list as $v): ?>
                                            <div class=" center teacher-list">
                                                <a href="<?php echo site_url("teacher/detail?id={$v['id']}"); ?>" title="<?php echo $v['title']; ?>">
                                                    <div class="img" style="">
                                                        <img src="<?php echo $v['pic']; ?>">
                                                    </div>
                                                    <p><?php echo $v['title'], " ", $v['zhicheng']; ?></p>
                                                </a>
                                            </div>           
                                        <?php endforeach; ?>
                                        <div class="clear"></div>
                                    </div>

                                <?php else : ?>
                                    暂无信息
                                <?php endif; ?>
                            </div>
                        </div>
                    <?php endif; ?>
                    <?php if ($action == "detail"): ?>

                        <style>
                            .info_detail{



                            }
                            .info_detail .title{
                                font-size: 18px;
                                text-align: center;
                                font-weight: 600;
                                padding: 10px;
                            }
                            .info_detail .times{
                                text-align: center;
                                padding: 10px;
                                color: #999999;
                            }
                            .info_detail .info_detail_content img{text-align: center;}
                            .info_detail .info_detail_content{
                                line-height: 32px;
                                font-size: 16px;
                                color: #000;
                            }
                            .info_detail .info_detail_content *{
                                max-width: 100%;
                                padding: 5px;
                            }
                        </style>
                        <div class="panel">
                            <div class="panel-heading" style="border-bottom: 2px #0575bd solid;">
                                <div class="panel-title" style="color: #0575bd;font-weight: 600;">教师风采</div>
                            </div>
                            <div class="panel-body info_detail">
                                <?php if ($teacher): ?>

                                    <div class="title">
                                        <?php echo $teacher['title'], " ", $teacher['zhicheng']; ?>
                                    </div>
                                    <div class = "times">发布时间：<?php echo date("Y/m/d", $teacher['addtime']); ?> </div>
                                    <hr style = "">
                                    <div class = "info_detail_content">
                                        <?php echo ($teacher['content']);
                                        ?>
                                    </div>
                                <?php else : ?>
                                    暂无信息
                                <?php endif; ?>
                            </div>
                        </div>
                    <?php endif; ?>

                </div><!-- /.col-md-8 -->
                <div class="col-md-4">
                    <?php $this->load->view('common/sidebar_login'); ?>
                    <?php $this->load->view('common/sidebar_cates'); ?>

                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">社区统计</h3>
                        </div>
                        <div class="panel-body">
                            <ul class="list-unstyled">
                                <li>最新会员：<?php echo $stats['last_username'] ?></li>
                                <li>注册会员： <?php echo $stats['total_users'] ?></li>
                                <li>今日话题： <?php echo $stats['today_topics']; ?></li>
                                <li>昨日话题： <?php echo $stats['yesterday_topics']; ?></li>
                                <li>话题总数： <?php echo $stats['total_topics'] ?></li>
                                <li>回复数： <?php echo $stats['total_comments'] ?></li>
                            </ul>
                        </div>
                    </div> 


                    <?php $this->load->view('common/sidebar_ad'); ?>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">友情链接</h3>
                        </div>
                        <div class="panel-body">
                            <ul class="list-unstyled">
                                <li style="width:0; height:0; overflow:hidden;"><a href="http://www.startbbs.com" target="_blank">StartBBS</a></li>
                                    <?php if ($links) { ?>
                                        <?php foreach ($links as $v) { ?>
                                            <?php if ($v['is_hidden'] == 0) { ?>
                                            <li><a href="<?php echo $v['url']; ?>" target="_blank"><?php echo $v['name']; ?></a></li>
                                        <?php } else { ?>
                                            <li>暂无链接</li>
                                        <?php } ?>
                                    <?php } ?>
                                <?php } else { ?>
                                    <li>暂无链接</li>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div><!-- /.col-md-4 -->
            </div><!-- /.row -->
        </div><!-- /.container -->

        <?php $this->load->view('common/footer'); ?>
        <script>
            $(function () {
                var page = 2;
                var cateid = '<?php echo $cateid; ?>';
                $("#getmore").click(function () {
                    var data;
                    $.get('<?php echo site_url(); ?>/infoArt/getmore?page=' + page + '&cate=' + cateid, function (data) {
                        page++;
                        $("#topic_list").append(data);
                    });
                    //$("#infolist").after(tr);
                });
            });

        </script>

    </body>
</html>